home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / RIncludes / OSUtils.r < prev    next >
Encoding:
Text File  |  1998-02-12  |  3.6 KB  |  123 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OSUtils.r
  3.  
  4.      Contains:    OS Utilities Interfaces.
  5.  
  6.      Version:    Technology:    Mac OS 8
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18.  
  19. #ifndef __OSUTILS_R__
  20. #define __OSUTILS_R__
  21.  
  22. #ifndef __CONDITIONALMACROS_R__
  23. #include "ConditionalMacros.r"
  24. #endif
  25.  
  26.  
  27. /* The following are from the SysTypes.r file and don't have a good home yet */
  28.  
  29.  
  30. /*-----------------------accl • Mouse Acceleration Tables ------------------------------*/
  31. type 'accl' {
  32.     literal longint                        /* Device identifier or device class */
  33.         classAbsolute,                    /* A flat-response device */
  34.         classMouse,                        /* Mechanical or optical mouse */
  35.         classTrackball,                    /* Trackball */
  36.         classScratchPad,                /* e. g. Midas */
  37.         classJoystick,                    /* e. g. HomeRow */
  38.         classRelTablet;                    /* Relative tablet */
  39.  
  40.     integer = $$CountOf(AcclTable);        /* Number of tables for this device */
  41.     array AcclTable {                    /* Entries sorted by first value; must have at least 0.0 and 1.0 tables */
  42.         unsigned hex longint;            /* Acceleration provided by this table (Fixed) */
  43.  
  44.         integer = $$CountOf(AcclPoint);    /* Number of control points for this device */
  45.         wide array AcclPoint {            /* Entries sorted by first value; implicit first entry (0.0, 0.0); at least one more entry required */
  46.             unsigned hex longint;        /* Device speed (inches per second) (Fixed) */
  47.             unsigned hex longint;        /* Cursor speed (inches per second) (Fixed) */
  48.         };
  49.     };
  50. };
  51.  
  52. /*----------------------------mcky • Mouse Tracking-------------------------------------*/
  53. type 'mcky' {
  54.         array [8] {
  55.             unsigned byte;
  56.         };
  57. };
  58. /*----------------------------KCAP • Physical Layout of Keyboard------------------------*/
  59. type 'KCAP' {
  60.         rect;                                                    /* boundsRect            */
  61.         rect;                                                    /* textRect                */
  62.         integer = $$CountOf(MainArray);
  63.         array MainArray {
  64.             integer = $$CountOf(ShapeArray) - 1;
  65.             wide array ShapeArray {
  66.                 point;                                            /* shapePoint            */
  67.             };
  68.             integer = $$CountOf(KeyArray) - 1;
  69.             wide array KeyArray {
  70.                 byte;                                            /* mask                    */
  71.                 boolean                or, and;
  72.                 bitstring[7];                                    /* keyCode                */
  73.                 integer;                                        /* dv                    */
  74.                 integer;                                        /* dh                    */
  75.             };
  76.         };
  77. };
  78. /*----------------------------KCHR • ASCII Mapping (software)---------------------------*/
  79. type 'KCHR' {
  80.         integer;                                                /* Version                */
  81.         wide array [$100] {                                        /* Indexes                */
  82.             byte;
  83.         };
  84.         integer = $$CountOf(TableArray);
  85.         array TableArray {
  86.             wide array [$80] {                                    /* ASCII characters        */
  87.                 char;
  88.             };
  89.         };
  90.         integer = $$CountOf(DeadArray);
  91.         array DeadArray {
  92.             byte;                                                /* Table number            */
  93.             byte;                                                /* Virtual keycode        */
  94.             integer = $$CountOf(CompletorArray);
  95.             wide array CompletorArray {
  96.                 char;                                            /* Completor char        */
  97.                 char;                                            /* Substituting char    */
  98.             };
  99.             char;                                                /* No match char        */
  100.             char;                                                /* 16-bits for the times
  101.                                                                    when 8 isn't enough    */
  102.         };
  103. };
  104. /*----------------------------KMAP • Keyboard Mapping (hardware)------------------------*/
  105. type 'KMAP' {
  106.         integer;                                                /* ID                    */
  107.         integer;                                                /* Version                */
  108.         wide array [$80] {                                        /* Raw to virtual        */
  109.             byte;                                                /*  keycode map            */
  110.         };
  111.         integer = $$CountOf(ExceptionArray);
  112.         wide array ExceptionArray {
  113.             byte;                                                /* Raw keycode            */
  114.             boolean            noXor, Xor;
  115.             fill bit[3];
  116.             bitstring[4];                                        /* ADB op                */
  117.             pstring;
  118.         };
  119. };
  120.  
  121. #endif /* __OSUTILS_R__ */
  122.  
  123.